home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_c
/
bc_ti
/
ti648.asc
< prev
next >
Wrap
Text File
|
1992-02-24
|
1KB
|
67 lines
PRODUCT : Borland C++ NUMBER : 648
VERSION : 2.0
OS : PC DOS
DATE : February 25, 1992 PAGE : 1/1
TITLE : Common Causes of General Protection Faults in TDW
The following are common causes for General Protection faults
while debugging a Windows application under Turbo Debugger for
Windows (TDW.EXE):
a) ram has called a Windows API function with incorrect arguments.
For example, passing WndProc a handle which is invalid.
b) The segment part of a pointer the program is using is invalid.
In protected mode it is an index into the selector table which
has the actual segment address. If that index references a spot
in the table which it shouldn't, or goes outside the bounds of
the table, it can cause a GP.
c) The user's WndProc function uses a handle between function calls
which has not been declared static, so the value has changed.
d) The CreateWindow API function calls your WndProc function with 3
messages. If WndProc is not debugged, it can cause problems
(like a GP).